package de.tabuma.sso.privileg;

import javax.jdo.*;
import javax.jdo.annotations.*;

/**
 * @author $Author: alefen $
 * @version $Revision: 1.1.1.1.2.1 $
 * @since $Date: 2010/01/08 10:03:24 $
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Privileg {

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    Long id;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }

    @Persistent
    String name;
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    @Persistent
    String description;
    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }

    @Persistent
    int projectId;
    public int getProjectId() {
        return projectId;
    }
    public void setProjectId(int projectId) {
        this.projectId = projectId;
    }

    @Persistent
    int art;
    public int getArt() {
        return art;
    }
    public void setArt(int art) {
        this.art = art;
    }

    @Persistent
    Boolean admin = new Boolean(Boolean.FALSE);
    public Boolean getAdmin() {
        if(admin==null) {
            admin = new Boolean(Boolean.FALSE);
        }
        return admin;
    }
    public void setAdmin(Boolean admin) {
        this.admin = admin;
    }
}
